/**
 * @file SubscribeToContactHandler.cs
 * @author Zane Mayo
 * @date 21/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class SubscribeToContactHandler : Handler {
		
		private static log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
		
		private string group;
		private string contactLoginName;
		private string nickName;
		private ContactType contactType;
		private string inviteMessageText;		
		
		public SubscribeToContactHandler() : base( typeof( SubscribeToContactProtocolMessage ) )  {
		}
		
		public SubscribeToContactHandler( string group, string contactLoginName, string nickName, ContactType contactType, string inviteMessageText ) : this() {
			this.group = group;
			this.contactLoginName = contactLoginName;
			this.nickName = nickName;
			this.contactType = contactType;
			this.inviteMessageText = inviteMessageText;
		}
		
		
		public override ProtocolMessage CreateRequestProtocolMessage() {
			
			SubscribeToContactProtocolMessage protocolMessage = new SubscribeToContactProtocolMessage();
			protocolMessage.Group = group;
			protocolMessage.ContactLoginName = contactLoginName;
			protocolMessage.NickName = nickName;
			protocolMessage.ContactType = contactType;
			protocolMessage.InviteMessageText = inviteMessageText;
			
			return protocolMessage;
		}
		
		
	}
}